#include "VentanaModo.h"

VentanaModo::VentanaModo() {
	this->modo = SINMODO;
	this->set_title("Screencast Educacional");
	this->set_resizable(false);
	this->etiqueta.set_text("Seleccion de modo");
	this->botonAlumno.set_label("Modo Alumno");
	this->botonInstructor.set_label("Modo Instructor");
	this->botonAlumno.signal_clicked().connect
			(sigc::mem_fun(*this, &VentanaModo::botonAlumnoClicked));
	this->botonInstructor.signal_clicked().connect
			(sigc::mem_fun(*this, &VentanaModo::botonInstructorClicked));
	this->cajaH.pack_start(this->botonAlumno, Gtk::PACK_EXPAND_PADDING);
	this->cajaH.pack_end(this->botonInstructor, Gtk::PACK_EXPAND_PADDING);
	this->cajaH.set_spacing(30);
	cajaV.pack_start(this->etiqueta, Gtk::PACK_EXPAND_PADDING);
	cajaV.pack_end(this->cajaH, Gtk::PACK_EXPAND_PADDING);
	this->cajaV.set_border_width(30);
	this->cajaV.set_spacing(30);
	this->add(this->cajaV);
	this->show_all();
}

int VentanaModo::getModo() {
	return this->modo;
}

void VentanaModo::botonAlumnoClicked() {
	this->hide();
	Gtk::Main::quit();
	this->modo = MODOALUMNO;
}

void VentanaModo::botonInstructorClicked() {
	this->hide();
	Gtk::Main::quit();
	this->modo = MODOINSTRUCTOR;
}

VentanaModo::~VentanaModo() {}
